<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>操作数lval</title>
</head>

<body>
  <script>
    // lval为lvalue左值，意思是可以合法出现在赋值表达式左侧的表达式，在js中变量，对象属性和数组元素都是“左值”
    let array = {
      a: [1, 2],
      b: 'a',
      c: 'b'
    }
    console.log(++array.a[0]);
    console.log(array['b'] + array['c']);
    console.log(array.a[0] + array.a[1]);
    console.log(delete array.a[1])
    console.log(array);



    console.log(-1 >>> 4);
    let a = {
      a: 1
    }
    let b = ['1']
    console.log(a.valueOf());
    console.log(Number(a.valueOf()));//NaN

    console.log(Number(b.valueOf().toString()));//1
    console.log(b);
    console.log(b < Infinity);
    console.log(2 > 1n);
    console.log('c' > 'd');

  </script>
</body>

</html>